home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / HoW Developer’s Kit 1.1 / HoWRez.English.r < prev    next >
Text File  |  1994-03-31  |  7KB  |  223 lines

  1. /*______________________________________________________________________
  2.  
  3.     Help on Wheels
  4.     
  5.     Version 1.1
  6.  
  7.     an AWOL Software Production
  8.     PO Box 24207
  9.     300 Eagleson Road
  10.     Kanata, Ontario, Canada K2M 2C3
  11.  
  12.     Internet: ab026@freenet.carleton.ca
  13.     
  14.     Copyright © 1994 Ross Brown.  All rights reserved.
  15.     Portions written by John Norstad are Copyright © 1988, 1989, 1990
  16.     Northwestern University.
  17. _____________________________________________________________________*/
  18.  
  19.  
  20. /*______________________________________________________________________
  21.  
  22.     HoWRez.English.r - Help on Wheels Resource Definitions (English).
  23.     
  24.     These resource definitions must be compiled into the client's help
  25.     file, whether it be the application file itself or a separate file.
  26.     Without these resources, the client's call to HoWRegister will fail.
  27.     
  28.     This resource definitions file uses a number of defined symbols
  29.     which you can define using Rez's "-d" option:
  30.     
  31.     symbol            meaning                                                default value
  32.     ------            -------                                                -------------
  33.     version    .    .    the version number    .    .    .    .    .    .    .    none (absent)
  34.     versionString    the version as a character string    .    .    none (absent)
  35.     languageCode    the language code    .    .    .    .    .    .    .    .    0 (langEnglish)
  36.     HoWi    .    .    .    ID of first doc 'STR#' resource    .    .    .    256
  37.     HoWt    .    .    .    ID of 'TCON' resource    .    .    .    .    .    .    256
  38.     HoWg    .    .    .    ID of 'TAG ' resource    .    .    .    .    .    .    256
  39.     HoWc    .    .    .    ID of 'CELL' resource    .    .    .    .    .    .    256
  40.     HoWa    .    .    .    ID of 'ALRT', 'DITL', 'STR ' resources    .    256
  41.     application    .    name of client application
  42.                             (quoted string)    .    .    .    .    .    .    .    none
  43.     extension    .    name of client extension or control panel
  44.                             (quoted string)    .    .    .    .    .    .    .    none
  45.     
  46.     The "version" symbol is only for help files which are separate from
  47.     the application file.  If you define a value for the "version" symbol,
  48.     the help file will contain a 'vers'(1) resource containing that
  49.     version number (in BCD).  Also define the "versionString" symbol if
  50.     you want an equivalent character version to appear in Finder's Get Info
  51.     box for the help file.  If you do not define a value for the "version"
  52.     symbol, no 'vers' resource will be added, and client version checking
  53.     will not occur.
  54.     
  55.     The "languageCode" symbol is most important, because its value becomes
  56.     the ID of the master 'HoW!' resource which points to the others.
  57.     When loading help information, Help on Wheels looks for a master
  58.     resource whose ID matches the current system's current language code,
  59.     or if that fails, the following, in turn:  the language code of the
  60.     server's local version; the default language code indicated by the
  61.     client at registration; and finally, langEnglish (0).
  62.     
  63.     The values you define for the "HoWi", "HoWt", "HoWg", and "HoWc"
  64.     symbols must match the values passed to the "cvrt" tool using
  65.     the options "-i", "-t", "-g", and "-c" respectively.  You must ensure
  66.     that the range of 'STR#' resource IDs beginning at "HoWi" does not
  67.     overlap with any 'STR#' resources you define in your application,
  68.     and likewise that your application has no 'ALRT', 'DITL', or 'STR '
  69.     resources whose ID matches "HoWa".
  70.     
  71.     The "application" symbol is needed only for help files which are
  72.     separate from the application file.  It helps provide an informative
  73.     alert message to users who try to open or print the help file in the
  74.     absence of the help server.  To supply a quoted string value to Rez,
  75.     you must escape the quote characters, thus:  -d application=∂"App∂"
  76.     
  77.     Define the "extension" symbol instead of "application" if your help
  78.     file is a control panel or extension.  Note that the alert message
  79.     generated assumes that your extension detects the Help and Command-?
  80.     keys at startup.
  81.     
  82.     If the help file supports multiple languages, you must also compile
  83.     in the equivalent resource definitions file for each other language
  84.     (e.g., HoWRez.French.r), using different values for all of the "HoW…"
  85.     defined symbols to avoid collisions.  If your help file is a separate
  86.     file, define the "version", "versionString", "application", and
  87.     "extension" symbols only when compiling for the principal language.
  88.     
  89.     See HoWSample's help file for complete information on the use of
  90.     this interface.
  91. _____________________________________________________________________*/
  92.  
  93.  
  94. #define SystemSevenOrLater 1
  95. #include "SysTypes.r"
  96. #include "Types.r"
  97.  
  98. #ifdef version
  99. #ifndef versionString
  100. #define versionString ""
  101. #endif
  102. resource 'vers' (1, purgeable) {
  103.     (version & 0xFF00) >> 8,
  104.     version & 0xFF,
  105.     0,
  106.     0,
  107.     0,
  108.     versionString,
  109.     versionString
  110. };
  111. #endif
  112.  
  113. #ifndef languageCode
  114. #define languageCode 0    /* default language code = langEnglish (0) */
  115. #endif
  116.  
  117. #ifndef HoWi
  118. #define HoWi 256
  119. #endif
  120.  
  121. #ifndef HoWt
  122. #define HoWt 256
  123. #endif
  124.  
  125. #ifndef HoWg
  126. #define HoWg 256
  127. #endif
  128.  
  129. #ifndef HoWc
  130. #define HoWc 256
  131. #endif
  132.  
  133. #ifndef HoWa
  134. #define HoWa 256
  135. #endif
  136.  
  137. type 'HoW!' {
  138.     integer;                    /* first doc 'STR#' resource ID */
  139.     integer;                    /* 'TCON' resource ID */
  140.     integer;                    /* 'TAG ' resource ID */
  141.     integer;                    /* 'CELL' resource ID */
  142.     integer;                    /* 'ALRT'/'DITL'/'STR ' resource ID */
  143. };
  144.  
  145. resource 'HoW!' (languageCode) {
  146.     HoWi,                        /* first doc 'STR#' resource ID */
  147.     HoWt,                        /* 'TCON' resource ID */
  148.     HoWg,                        /* 'TAG ' resource ID */
  149.     HoWc,                        /* 'CELL' resource ID */
  150.     HoWa,                        /* 'ALRT'/'DITL'/'STR ' resource ID */
  151. };
  152.  
  153. #ifndef extension
  154. resource 'ALRT' (HoWa, "(HoW) Save Help Text", purgeable) {
  155.     {0, 0, 130, 368},
  156.     HoWa,
  157.     {    /* array: 4 elements */
  158.         /* [1] */
  159.         OK, visible, silent,
  160.         /* [2] */
  161.         OK, visible, silent,
  162.         /* [3] */
  163.         OK, visible, silent,
  164.         /* [4] */
  165.         OK, visible, silent
  166.     },
  167.     alertPositionMainScreen
  168. };
  169. #endif
  170.  
  171. #ifndef extension
  172. resource 'DITL' (HoWa, "(HoW) Save Help Text", purgeable) {
  173.     {    /* array DITLarray: 3 elements */
  174.         /* [1] */
  175.         {100, 299, 120, 358},
  176.         Button {
  177.             enabled,
  178.             "OK"
  179.         },
  180.         /* [2] */
  181.         {100, 227, 120, 286},
  182.         Button {
  183.             enabled,
  184.             "Cancel"
  185.         },
  186.         /* [3] */
  187.         {7, 74, 87, 358},
  188.         StaticText {
  189.             disabled,
  190.             "Help could not be displayed, because "
  191.             "the help server application “Help on Wheels” "
  192.             "could not be found.  "
  193.             "Do you want to save a readable copy "
  194.             "of the documentation as a TeachText document?"
  195.         }
  196.     }
  197. };
  198. #endif
  199.  
  200. #ifndef extension
  201. resource 'STR ' (HoWa, "(HoW) Save Help Text", purgeable) {
  202.     "Save help text in:"
  203. };
  204. #endif
  205.  
  206. #if defined(application) || defined(extension)
  207. resource 'STR '(-16397, purgeable) {
  208.     "This document could not be opened, "
  209.     "because the help server application "
  210.     "“Help on Wheels” could not be found.  "
  211.     "To get a readable copy of the documentation, "
  212. #ifdef application
  213.     "ask for help while using “" application "”."
  214. #else
  215.     "press Help or Command-? while “" extension "” is loading at startup."
  216. #endif
  217. };
  218. #else
  219. resource 'STR '(-16396, purgeable) {
  220.     "Help on Wheels"
  221. };
  222. #endif
  223.